{layout name="layout/sharewifi" /}
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-cf">用户列表</div>
                </div>
                <div class="widget-body am-fr">
                    <!-- 工具栏 -->
                    <div class="page_toolbar am-margin-bottom am-cf">
                        <form class="toolbar-form" action="{:url('sharewifi.user/index')}">
                            <div class="am-u-sm-12">
                                <div class="am fr">
                                    <div class="am-form-group am-fl">
                                        <div class="am-input-group am-input-group-sm tpl-form-border-form">
                                            <input type="text" class="am-form-field" name="search" placeholder="请输入微信昵称、ID、手机号" value="{$search}">
                                            <div class="am-input-group-btn">
                                                <button class="am-btn am-btn-default am-icon-search" type="submit"></button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-scrollable-horizontal am-u-sm-12">
                        <table width="100%" class="am-table am-table-hover tpl-table-black">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>头像</th>
                                <th>昵称</th>
                                <th>身份</th>
                                <th>性别</th>
                                <th>姓名</th>
                                <th>电话</th>
                                <th>城市</th>
								<th>钱包</th>
								<th>推荐</th>
								<th>登录</th>
								<th>时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            {if !$list->isEmpty()}
                                {foreach $list as $item}
                                <tr>
                                    <td class="am-text-middle">{$item['user_id']}</td>
                                    <td class="am-text-middle">
                                        <img src="{$item['avatar']}" width="72" height="72" alt="">
                                    </td>
                                    <td class="am-text-middle">{$item['nickname']|default='--'}</td>
                                    <td class="am-text-middle">
                                        <span class="am-badge am-radius 
                                            {$item['status']['value'] == 10 ? '' : ' am-badge-success'}">
                                            {$item['status']['text']}
                                        </span>
                                    </td>
                                    <td class="am-text-middle">
                                        <span class="am-badge am-radius 
                                            {$item['gender'] ==  '先生'? ' am-badge-primary' : ''} 
                                            {$item['gender'] ==  '女士'? ' am-badge-danger' : ''}">
                                            {$item['gender']}
                                        </span>
                                    </td>
                                    <td class="am-text-middle">{$item['linkman']|default='--'}</td>
                                    <td class="am-text-middle">{$item['phone']|default='--'}</td>
                                    <td class="am-text-middle">{$item['city']|default='--'}</td>
									<td class="am-text-middle">{$item['money']>0?:'--'}</td>
									<td class="am-text-middle">{$item['recommender']>0?:'--'}</td>
									<td class="am-text-middle">{$item['login_count']>0?:'--'}</td>
									<td class="am-text-middle">{$item['create_time']}</td>
                                </tr>
                                {/foreach}
                            {else /}
                                <tr>
                                    <td colspan="12" class="am-text-center">暂无记录</td>
                                </tr>
                            {/if}
                            </tbody>
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">
                        <div class="am-fr">{:$list->render()} </div>
                        <div class="am-fr pagination-total am-margin-right">
                            <div class="am-vertical-align-middle">总记录：{:$list->total()}</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>